package com.zhanbo.zhanbowymusic.main;

import android.os.Bundle;
import android.view.View;

import androidx.recyclerview.widget.LinearLayoutManager;

import com.mwx.baselib.base.BaseFragment;
import com.zhanbo.zhanbowymusic.R;
import com.zhanbo.zhanbowymusic.databinding.FragmentPCZoneBinding;
import com.zhanbo.zhanbowymusic.databinding.FragmentPCZoneDetailsBinding;
import com.zhanbo.zhanbowymusic.main.featured.adapter.PCZoneListDetailsAdapter;
import com.zhanbo.zhanbowymusic.main.mine.create.adapter.CreatePlaylistDetailsListAdapter;

import java.util.ArrayList;
import java.util.List;

public class PCZoneListDetailsFragment extends BaseFragment<FragmentPCZoneDetailsBinding> {
    @Override
    protected Object getLayout() {
        return R.layout.fragment_p_c_zone_details;
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        initData();
        initView();
        initListener();
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void initView() {
        List<Integer> stringList = new ArrayList<>();
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        stringList.add(1);
        binding.rvPCZoneDetails.setLayoutManager(new LinearLayoutManager(_mActivity, LinearLayoutManager.VERTICAL, false));
        PCZoneListDetailsAdapter adapter = new PCZoneListDetailsAdapter(_mActivity);
        adapter.getItems().addAll(stringList);
        binding.rvPCZoneDetails.setAdapter(adapter);
    }

    @Override
    protected void initListener() {
        binding.iconBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                pop();
            }
        });
    }

    public static PCZoneListDetailsFragment newInstance() {

        Bundle args = new Bundle();

        PCZoneListDetailsFragment fragment = new PCZoneListDetailsFragment();
        fragment.setArguments(args);
        return fragment;
    }
}
